package com.common.controller;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import com.models.*;
import javax.servlet.http.HttpSession;

public class SessionHelper {

    HttpSession session;

    public SessionHelper(HttpSession session) {
        this.session = session;
        session.setMaxInactiveInterval(60 * 60 * 24);
    }

    public boolean isLoggedIn() {
        return session.getAttribute("user_id") != null;
    }

}
